
#ifndef __cmdlogin_h__
#define __cmdlogin_h__

#include "../maindef.h"
#include "commclass.h"
#include "PBMsgHead.pb.h"
#include "MsgLogin.pb.h"

class CMainCtrl;
class CUserOnlineData;
class CCmdLogin : public CTAsyncCmd
{
public:
    CCmdLogin()
    {
    }

    virtual ~CCmdLogin()
    {
    }

    virtual int Do(void* pData);
    virtual int LogicDo(int iRet);
    virtual int CallBack(int iRet);
    virtual int AnsClients(int iRet);

    CMainCtrl*  pstMainCtrl;
    PBMsgHead   stMsgHead;
    CEnpNetHead stEnpHead;

    MsgReqLogin stReq;
    MsgAnsLogin stAns;

    bool    bHasCheckDBSvr;
    uint64  u64GID;
    CTSizeString<USER_TOKEN_LEN> szUserToken;

private:
    void NotifyInfoToUser(CPlayerDBInfo& stPlayerDBInfo, CUserOnlineData& stUserOnlineData);
}; 

#endif // __cmdlogin_h__

